Currently, most of the terminal device, such as, a mobile phone, a computer, a smart television, and so on, all use internal network IP of a network operator's gateway, such as, all use IPV4, not a separately public IP. In order to improve a utilization rate of addresses, network operator retrieves addresses which are unused for a long-term, and the retrieves are not to be noticed. So in an normal case, if a client in the terminal does not try to communicating with a server of the network operator, it is impossible to learn that a connection between the client in the terminal and the server of the network operator is retrieved.
With the development of the times, the clients of a variety of terminals unilaterally send requests of acquiring information to the server of the network operator in the unilateral end of services to network operators, it is not adequate to meet the needs that app of the terminal acquires information timely. For example, when a breaking news occurs, the server can pushes the news to a news app on the terminal to notice users, at this time, the server of the network operator should inform the client of the terminal, and it should be no longer limited to that the client unilaterally sends request to the server.
However, in order to realize that the client and the server can inform to each other in the current network situation, a long connection needs to be established. In the existed long connection projects, one business uses a long connection, such that the utilization rate of the long connection is low, most of the long connections are in idle state. As heartbeat time on the terminal cannot be aligned, which causes that the CPU is usually awakened, electric is highly consumed. And a heartbeat for maintaining the survive of the long connection should be regularly sent. As the terminals are many and varied, the network environments which the terminals are located are also different, some networks are good, and need a heartbeat in one hour, some networks may need a heartbeat in one minute. If the time of sending heartbeat is unified, the time of sending heartbeat must be a lowest value, otherwise many networks may not live.